# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['asr_gui.py'],
    pathex=[],
    binaries=[],
    datas=[],
    hiddenimports=[
        'PyQt5',
        'PyQt5.QtCore',
        'PyQt5.QtGui',
        'PyQt5.QtWidgets',
        'qfluentwidgets',
        'darkdetect',
        'requests',
        'urllib3',
        'certifi',
        'charset_normalizer',
        'idna',
    ],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)

# 添加资源文件
a.datas += [('LICENSE', 'LICENSE', 'DATA')]
a.datas += [('README.md', 'README.md', 'DATA')]
a.datas += [('README_en.md', 'README_en.md', 'DATA')]
a.datas += [('requirements.txt', 'requirements.txt', 'DATA')]

# 添加 PyQt5 插件
a.binaries += [('Qt5Core.dll', 'C:\\Program Files\\Python39\\Lib\\site-packages\\PyQt5\\Qt5\\bin\\Qt5Core.dll', 'BINARY')]
a.binaries += [('Qt5Gui.dll', 'C:\\Program Files\\Python39\\Lib\\site-packages\\PyQt5\\Qt5\\bin\\Qt5Gui.dll', 'BINARY')]
a.binaries += [('Qt5Widgets.dll', 'C:\\Program Files\\Python39\\Lib\\site-packages\\PyQt5\\Qt5\\bin\\Qt5Widgets.dll', 'BINARY')]

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='VideoTextPro',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon='assets/app.ico',
) 